<script src="/Public/home/template-native.js"></script>
<script src="/Public/home/login.js"></script>
<!--顶部导航条 -->
			<div class="am-container header">
				<ul class="message-l">
					<div class="topMessage">
						<div class="menu-hd" id="menu-hide">
							<a href="/Home/Login/login" target="_top" class="h">亲，请登录</a>
							<a href="/Home/Login/register" target="_top">免费注册</a>
						</div>
						<div class="menu-hd" id="menu-show">
							
						</div>
					</div>
				</ul>
				<ul class="message-r">
					<div class="topMessage home">
						<div class="menu-hd"><a href="/home/index" target="_top" class="h">商城首页</a></div>
					</div>
					<div class="topMessage my-shangcheng">
						<div class="menu-hd MyShangcheng"><a href="/Home/User/index?id={$_SESSION.uid}" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
					</div>
					<div class="topMessage mini-cart">
						<div class="menu-hd"><a id="mc-menu-hd" href="/home/shopcar/shopcart" target="_top"><i class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong id="J_MiniCartNum" class="h">{$count}</strong></a></div>
					</div>
					<div class="topMessage favorite">
						<div class="menu-hd"><a href="#" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a></div>
				</ul>
				</div>

				<!--悬浮搜索框-->

				<div class="nav white">
					<div class="logoBig">
						<li><img src="/Public/images/logobig.png" /></li>
					</div>

					<div class="search-bar pr">
						<a name="index_none_header_sysc" href="#"></a>
						<form>
							<input id="searchInput" name="keyword" type="text" placeholder="搜索" autocomplete="off">
							<input id="ai-topsearch" class="submit am-btn" value="搜索" index="1" type="button" onclick="javascript:keysearch(this);">
						</form>
					</div>
				</div>

				<div class="clear"></div>
			</div>
			 
<!--登录与登出窗口-->
<script id="loginin-tql" type="text/html">

	<span>welcome!</span>
	<span><%=data.name%></span>
	<a href="javascript:LOGIN.userloginout();" target="_top">登出</a>
</script>

<script>
function keysearch(obj){
	var keyword = $(obj).prev('#searchInput').val();
	$.get('/Api/search/keysearch' , {keyword:keyword} , function(ret){
			if( ret.status == true){
				window.location.href="/home/search/search?keyword="+keyword;
			}
			else{
				alert(ret.data);
			}
	})
}

	
	
LOGIN.run();
</script>
